package com.lt.lumentracks.entity.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.io.Serial;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 会话成员表 (关联表)
 * </p>
 *
 * @author swl
 * @since 2025-10-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("conversation_user")
public class ConversationUser implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 会话id
     */
    private Long conversationId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 该用户在此会话中已读的最后一条消息ID (用于实现未读消息数)
     */
    private Long lastReadMessageId;

    /**
     * 上次清理会话的时间
     */
    private LocalDateTime lastCleanTime;

    /**
     * 当前是否为清空状态(0否，1是，默认0)
     */
    private Boolean cleanStatus;

    /**
     * 加入该会话的时间
     */
    private LocalDateTime createTime;


}
